{% extends "base.html" %}

{% block content %}
    {%if item %}
        <h2>Редактируем раздел</h2>
    {% else %}
        <h2>Добавляем раздел</h2>
    {% endif %}
    
    <br>
    <form action="/manage/portfolio-cats" method="post" enctype="multipart/form-data">
        
        {%if item %}
            <input type="hidden" name="id" value="{{ item.key.id }}" />
        {% endif %}
        
        <input type="hidden" name="action" value="{{ action|escape }}" />
        
        <div>Title:<br><input type="text" name="title" value="{{ item.title|escape }}" /></div>
        <div>Slug:<br><input type="text" name="name" value="{{ item.name|escape }}" /></div>
        
        <div><input type="submit" value="Ok"></div>
        <div><a href="/manage/portfolio-cats">Отмена</a></div>
    </form>
{% endblock %}